﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using SaveAWatt.Data;
using SaveAWatt.Framework;

using Mono.Data.Sqlite;

namespace SaveAWatt.Data.SQLite
{
    public class SQLiteEnergyData : IEnergyData
    {
        private const string energyDataSelect = "select * from EnergyData";

        private SqliteConnection m_conn;

        public EnergyBase[] GetEnergyData(string id, DateTime beginTime, TimeSpan times)
        {
            EnergyBase[] eb = new EnergyBase[10];
            return eb;
        }

        public bool StoreEnergyData(string id, DateTime recorded_time, double current_reading)
        {
            return true;
        }

        public bool RemoveEMM(string id)
        {
            return true;
        }

        public void Initialise(string dbconnect)
        {
            if (dbconnect == string.Empty)
            {
                dbconnect = "URI=file:EnergyData.db,version=3";
            }
            m_conn = new SqliteConnection(dbconnect);
            m_conn.Open();

            return;
        }
    }
}
